export function getResConstruction(res = "") {
  switch ((res || "").constructor) {
    case Array:
      return "[" + getResConstruction(res[0] || "") + "]";
    case Object:
      return "{" + Object.keys(res).map(key => {
        let value = getResConstruction(res[key]);
        return key + (value ? ":" + value : "")
      }).join(", ") + "}"
    default:
      return "";
  }
}